﻿using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Text
{
    [XmlRoot("custDash", Namespace = Constants.Main)]
    public class CustomDash : XmlSerializable, ILineDashProperty
    {
        [Optional]
        [XmlElement("ds", Namespace = Constants.Main)]
        public XmlList<DashStop> DashStops { get; set; }

        public CustomDash() { }
    }

    [XmlRoot("ds", Namespace = Constants.Main)]
    public class DashStop : XmlSerializable
    {
        [Optional]
        [XmlAttribute("d", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> DashLength { get; set; }

        [Optional]
        [XmlAttribute("sp", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> SpaceLength { get; set; }

        public DashStop() { }
    }
}
